//
//  Country.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Country.h"

@implementation Country

-(id)init
{

    _name = @"China";
    _size = 2345;
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %ld", _name, _size);

}

-(void)attack
{

    NSLog(@"攻打小%@", _name);

}



-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(NSInteger)size
{
    return _size;
}
-(void)setSize:(NSInteger)size
{
    _size = size;
}
-(id)initWithName:(NSString *)name size:(NSInteger)size
{

    _name = name;
    _size = size;
    return self;

}


+ (id)countryWithName:(NSString *)name size:(NSInteger)size
{
    Country *c = [[Country alloc] initWithName:name size:size];
    return c;
}



@end
